import request from '@/utils/request'
import {URL} from '@/utils/url'
import axios from 'axios'

export function sendDanmu({vid,text,time,color,type}) {
    return request.post('danmu/send',{vid,text,time,color,type})
}

export function getDanmu(vid){
    const url = URL + 'api/danmu/get'
    const data ={
      'vid': vid,
    }
    return axios.get(url,{
      params: data
    }).then(res => {
      return Promise.resolve(res)
    })
}